package com.sure.supermarketserver.security.home.dao;

import java.util.List;
import com.sure.supermarketserver.security.home.Module;
import com.sure.supermarketserver.security.home.Home;
import com.sure.supermarketserver.security.home.HomeDto;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;


public interface HomeDao {

    public List<Module> findModuleByUser(String userId);

    @Update("update staff set st_avatar = #{st_avatar} where st_id = #{st_id}")
    void updateAvatar(@Param("st_id") String userId, @Param("st_avatar") String filename);

    //查询
    List<Home> findHomeList(HomeDto dto);

    //增加
    void insertHome(HomeDto dto);

    //修改
    void updateHome(HomeDto dto);

    //删除
    @Delete("delete from staff where st_id = #{st_id}")
    void deleteHome(Integer id);
}
